import { proxybase } from '@/utils/constants'
import request from '@/utils/request'
import { getToken } from "@/utils/auth";

export function login(data) {
  return request({
    url: proxybase + 'user/login',
    method: 'post',
    data,
  })
}

export function getInfo() {
  return request({
    url: proxybase + 'user/info',
    method: 'get',
    params: {
      token: getToken()
    }
  })
}

export function logout() {
  return request({
    url: proxybase + 'user/logout',
    method: 'post'
  })
}
